<template>
  <div id="GuanFang">
    <div class="iconName">
        <span>
            <img :src="IconImg" alt="">
        </span>
        <span>{{GoodName}}</span>
    </div>
    <ul>
        <li v-for="(item,key) in adplist" :key="key">
            <img :src=item.imageurl alt="">                              
        </li>
    </ul>
  </div>
</template>
<script>
export default {
    data(){
        return{
            GoodName:'',
            IconImg:'',
            adplist:[],           
        }
    },
    created(){
        var _this = this;
        this.$http.get(this.$baseUrl+'/api/home').then(function(response){
            if(response.data){
                _this.GoodName =  response.data.info[7].name;
                console.log(_this.GoodName);
                _this.IconImg = response.data.info[7].icon;
                // console.log(_this.IconImg);
                _this.adplist = response.data.info[7].adpositionlist;
                console.log(_this.adplist);
            }
        }).catch(function(error){
            console.log(error);
        })
    },
    filters:{
        //过滤器获取漫画简介
        formImg(value){
            value = JSON.parse(value);
            var SCFK = value.scfk344_202;
            // console.log(SCFK);
            return SCFK;
        }
    },
}
</script>
<style lang="scss" scoped>
    #GuanFang{
        width: 100%;
        height: 500px;
        background:#f5f3f3;
        padding-top: 10px;
        .iconName{
            width: 100%;
            height: 40px;
            padding-top:20px;
            background: #fff;
            span:nth-child(1){
            float: left;
                img{
                    width: 60%;
                    height:auto;
                    margin-left: 6px;
                }
            }
            span:nth-child(2){
                line-height: 30px;
                color:#CC0000;
                font-size: 18px;
                font-weight: bolder;
            }
        }
        ul{
            width: 100%;
            height:100%; 
            display: flex;
            overflow: scroll;
            overflow-y: none;      
            li{ 
                // white-space: ;                      
                list-style: none;
                text-align: center;                  
                width: 100%;
                height: 100%;
                // height: 300px;
                // position: absolute;            
                img{                       
                    width: 180px;
                    height: 120px;
                    margin-bottom: 20px;                                      
                }
            }
        }
    }
</style>
